package tech.aistar.corejava.day15.synchronizeddemo;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:银行的账户 - 临界资源
 * @date 2019/8/3 0003
 */
public class Account {

    private double balance = 100;
    /**查看**/
    public double getMoney() {
        return balance;
    }

    public void withdraw(double money){
        if(money<=balance){
            this.balance -= money;
        }
    }

}
